import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzInputModule } from 'ng-zorro-antd/input';
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';

@Component({
  selector: 'app-input-number-prefix',
  standalone: true,
  imports: [NzInputNumberModule, NzInputModule, FormsModule, NzIconModule],
  template: `
    <p class="demo demo-space">
      <nz-input-number-group nzPrefix="￥">
        <nz-input-number />
      </nz-input-number-group>

      <nz-input-number-group nzPrefix="￥" nzAddOnBeforeIcon="user">
        <nz-input-number />
      </nz-input-number-group>

      <nz-input-number-group nzPrefix="￥">
        <nz-input-number [nzDisabled]="true" />
      </nz-input-number-group>
    </p>
  `,
})
export class InputNumberPrefixComponent {
  value: number | '' = '';
}
